//
//  gongsijianjie.m
//  BAOASystem
//
//  Created by michael on 2018/3/5.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "gongsijianjie.h"

@implementation gongsijianjie
- (void)setDic:(NSDictionary *)dic{



_dic = dic;
[self initview];
}
- (void)initview{

_tableview = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height) style:UITableViewStylePlain];
_tableview.backgroundColor = [UIColor whiteColor];
//_tableview.frame = self.frame;
_tableview.dataSource = self;
_tableview.delegate = self;
_tableview.separatorStyle = NO;

self.tableview.bounces = NO;
[self addSubview:_tableview];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
NSDictionary *comdic = _dic[@"company"];
 CGFloat height = [OAToolBox sizebyText:comdic[@"newDescription"] font:13 minsWidth:20];
return height+20;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
 static NSString *CellIdentifier1 = @"Cellbendititlepic1";

    UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
//    cell.backgroundColor = [UIColor colorWithHexString:@"f0eff5"];
if (cell==nil) {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1];
//            cell.backgroundColor = [UIColor colorWithHexString:@"f0eff5"];

    }
        NSDictionary *comdic = _dic[@"company"];
    UILabel *label2 = [[UILabel alloc]init];
     CGFloat height = [OAToolBox sizebyText:comdic[@"newDescription"] font:13 minsWidth:20];

 label2.frame = CGRectMake(10,10, KScreenWidth-20, height);
 label2.backgroundColor = [UIColor whiteColor];
    label2.text  = comdic[@"newDescription"];
    label2.numberOfLines = 0;
    label2.textColor = [UIColor colorWithHexString:@"484848"];
   label2.font = [UIFont boldSystemFontOfSize:13];
[cell.contentView addSubview:label2];

    return cell;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
